package com.cdxy.controller;


import com.cdxy.biz.process.IAreaBizProcess;
import com.cdxy.model.dto.base.controller.BaseController;
import com.cdxy.model.dto.base.resp.ApiResponse;
import com.cdxy.model.dto.resp.AllAreaResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 区域表 前端控制器
 * </p>
 *
 * @author autoGenCode
 * @since 2020-03-05
 */
@RestController
@RequestMapping("/area")
@Api(tags = "区域")
public class AreaController extends BaseController {

    @Autowired
    private IAreaBizProcess areaBizProcess;


    @GetMapping("/allArea")
    @ApiOperation(value = "获取地域", notes = "获取地域")
    public ApiResponse<Map<String, AllAreaResp>> getArea() {
        return successApiResponse(areaBizProcess.allArea());
    }

}
